﻿@model IEnumerable<WebVideo.EntityFriend>
@{
    foreach (var item in Model)
    {
        if (item.UserName == Request.Cookies["UserId"].Value)
        {
            <div class="media">
                <div class="pull-left" style="width: 34px;">
                    @{if(item.EntityUser.Avatar == null)
                      {
                          <img class="media-object" src="/Content/Images/Avatar/AdminAvatar.jpg" alt="" style="width: 34px; height: 34px;" />
                      }
                      else
                      {
                           <img class="media-object" src="/Content/Images/Avatar/@item.EntityUser.Avatar" alt="" style="width: 34px; height: 34px;" />
                      }}
                   
                </div>
                <div class="media-body new">
                    <h5 class="media-heading">@item.UserNameFriend</h5>
                    <a href="#" onclick="return ChatContent('@item.UserNameFriend');">Gởi tin nhắn</a>
                </div>
            </div>
        }
        else
        {
             <div class="media">
                <div class="pull-left" style="width: 34px;">
                     @{if(item.EntityUser1.Avatar == null)
                      {
                          <img class="media-object" src="/Content/Images/Avatar/AdminAvatar.jpg" alt="" style="width: 34px; height: 34px;" />
                      }
                      else
                      {
                           <img class="media-object" src="/Content/Images/Avatar/@item.EntityUser1.Avatar" alt="" style="width: 34px; height: 34px;" />
                      }}
                </div>
                <div class="media-body new">
                    <h5 class="media-heading">@item.UserName</h5>
                    <a href="#" onclick="return ChatContent('@item.UserName');">Gởi tin nhắn</a>
                </div>
            </div>
        }

    }
}

